<template>
  <!-- 
  mp4在线测试地址
  https://www.runoob.com/try/demo_source/mov_bbb.mp4
  https://media.w3.org/2010/05/sintel/trailer.mp4
  http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4
  http://vjs.zencdn.net/v/oceans.mp4
  http://mirror.aarnet.edu.au/pub/TED-talks/911Mothers_2010W-480p.mp4
   -->
  <video :src="src" style="width: 100%;" loop="loop" @click="videoPlayPause">not support video</video>
</template>
<script>
export default {
  name: 'MediaVideo',
  components: {
  },
  props: {
    src: {
      type: String,
      default: () => {
        return ''
      }
    }
  },
  data () {
    return {
    }
  },
  computed: {
  },
  methods: {
    videoPlayPause (e) {
      let video = e.target
      if (video.paused) {
        video.play()
      } else {
        video.pause()
      }
    }
  }
}
</script>

<style lang="less" scoped>
</style>
